package com.hotel.dao;

import com.hotel.entity.commodity;

import java.util.List;

public interface commodityDao {

    public int deleteById(Integer id);


    public int insertAll(commodity commodityPo);


    public commodity selectById(Integer id);


    public int updateById(commodity commodityPo);


    //分页模糊查询
    public List<commodity> pageFuzzyselect(String commodityName, int commodityTypeID,
                                           int start, int pageSize);
    //分页模糊查询
    public List<commodity> pageFuzzySelectAll( String commodityName,
                                             int start,  int pageSize);

    //分页模糊查询总条数
    public int countFuzzyselect(String commodityName,  int commodityTypeID);

    //分页模糊查询总条数
    public int countFuzzySelectAll(String commodityName);

    //ajax 验证是否存在 此商品
    public int selectYZ(String commodityName);


    //无分页的模糊查询  非本派所用
    public List<commodity> fuzzySelect(String commodityName,
                                        int commodityTypeID);
    public List<commodity> fuzzySelectAll( String commodityName);

}
